package pl.szpadel.android.gadu.packets;

import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;

/// Send to add subscription to user status
public class AddNotify extends SendPacket {

	/// User id
	int mId;
	
	/// C-tor
	public AddNotify(int id) {
		super(TYPE_ADD_NOTIFY);
		mId = id;
	}

	@Override
	protected void writeToBuffer(ByteBuffer buffer)
			throws BufferOverflowException {
		
		buffer.putInt(mId);
		byte contactType = 0x01; // USER BUDDY
		buffer.put(contactType);

	}
	
	@Override
	public String toString() {
		return "AddNotify [ uin=" + mId + " ]";
	}

}
